﻿using System;
using UnityEngine;

// Token: 0x02000424 RID: 1060
public class ExplosionSource : MonoBehaviour
{
	// Token: 0x06001DE8 RID: 7656 RVA: 0x000B7987 File Offset: 0x000B5B87
	private void Start()
	{
		this.m_aFracturedObjects = (UnityEngine.Object.FindObjectsOfType(typeof(FracturedObject)) as FracturedObject[]);
		this.m_fStartTime = Time.time;
	}

	// Token: 0x06001DE9 RID: 7657 RVA: 0x000B79B0 File Offset: 0x000B5BB0
	private void Update()
	{
		if (!this.MoveManually)
		{
			base.transform.position = Vector3.Lerp(this.PosStart, this.PosEnd, Mathf.Clamp01((Time.time - this.m_fStartTime) / this.MoveDuration));
		}
		foreach (FracturedObject fracturedObject in this.m_aFracturedObjects)
		{
			fracturedObject.Explode(base.transform.position, this.Force, this.InfluenceRadius, false, true, false, this.CheckStructureIntegrity);
		}
	}

	// Token: 0x04001E0C RID: 7692
	public float InfluenceRadius = 1f;

	// Token: 0x04001E0D RID: 7693
	public float Force = 1f;

	// Token: 0x04001E0E RID: 7694
	public bool CheckStructureIntegrity;

	// Token: 0x04001E0F RID: 7695
	public bool MoveManually;

	// Token: 0x04001E10 RID: 7696
	public Vector3 PosStart;

	// Token: 0x04001E11 RID: 7697
	public Vector3 PosEnd;

	// Token: 0x04001E12 RID: 7698
	public float MoveDuration = 2f;

	// Token: 0x04001E13 RID: 7699
	private FracturedObject[] m_aFracturedObjects;

	// Token: 0x04001E14 RID: 7700
	private float m_fStartTime;
}
